home *** CD-ROM | disk | FTP | other *** search
- // ----------------------------------------------------------------------------------
- // Main.c
- // ----------------------------------------------------------------------------------
- // Main loop.
- //
- // This program is a quick and dirty demo I put together in between working on
- // the regular spell checker and the more complete demos I'm putting together.
- // The problem with the more complete demos is that they are fairly complicated.
- // The advantage of the demo is that while it is very unpolished, you can actually
- // figure out what is going on. This demo will get better with time as I add new
- // features. The big new feature to be added is the SpellWright Interface Libaray.
- // Right now I roll my own interface. This is actually probably a good thing as it
- // give you an idea of how to put together an interface. I don't use most of the
- // features of SpellWright, but that is OK. There is an other demo, APIDemo that
- // actually shows how to utilize each feature of SpellWright, but it uses stdio for
- // clarity and speed (and portability).
- //
- // This demo is copywrite 1994 by LexTek Internation. Feel free to use it for
- // whatever purpose you wish. The SpellWright Library may not be copied or
- // distributed, except when linked to your application that adds significant features
- // to the code. ie. you can't take the library, make a new library and sell it. You
- // can, however, use it without royalties in applications or other such projects.
- //
- // LexTek International
- // 2255 N. University Parkway, Suit 15
- // Provo, UT 84604
- // (801) 375.8332 Phone
- // (801) 375.7654 Fax
- //
- // ----------------------------------------------------------------------------------
- // History:
- // 8/26/94 Clark Goble Original
- //
-
- #include "EventLoop.h"
- #include "MenuHandler.h"
- #include "AEHandler.h"
- #include "Globals.h"
- #include "SpellWright.h"
- #include "SpellHandler.h"
-
- void main(void);
-
- extern void InitToolBox(short numberOfMasters);
- extern void DoEvent(void);
- extern void BuildMenuBars(void);
-
- // ----------------------------------------------------------------------------------
-
- void main(void)
- {
- InitToolBox(4);
-
- // free the memory used by the initialization routines
- UnloadSeg(InitToolBox);
-
- // create the SpellChecker global variables
- gtheSpeller = StartSpellCheckSession();
- gDocWindow = nil;
-
- BuildMenuBars();
- if (!gSys7)
- return;
-
- InitAEHandlers();
-
- InitMainDict();
-
- // here is the actual program
- DoEvent();
-
- // delete the SpellChecker global variables
- EndSpellCheckSession(gtheSpeller);
-
- } // main